<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
	<head>
		<meta charset="utf-8">
		<title>上传考试基本信息</title>
		<script type="text/javascript">
			function toVaild(){
			    var val = document.getElementById("inputsubject").value;
				var val1 = document.getElementById("examstart").value;
				var val2 = document.getElementById("examend").value;
				var val3 = document.getElementById("classidlist").value;
			    if(val != "" && val1 != "" && val2 != "" && val3 != ""){
			        return true;
			    }
			    else{
			        alert("考试信息填写不完整");
			        return false;
			    }
			}
		</script>
		<link href="css/app.css" rel="stylesheet">
		<link rel="stylesheet" href=""/>
		<link rel="stylesheet" href="../../static/css/exam/upexam.css"/>
	</head>
	<body>
		<div class="wrapper">
			<nav id="sidebar" class="sidebar js-sidebar">
				<div class="sidebar-content js-simplebar">
					<a class="sidebar-brand" href="index.html">
		      <span class="align-middle">AdminKit</span>
		    </a>
		
					<ul class="sidebar-nav">
						<li class="sidebar-header">
							Pages
						</li>
						<li class="sidebar-item">
							<a class="sidebar-link" href="pages-profile.html">
								<i class="align-middle" data-feather="user"></i> <span class="align-middle">Profile</span>
						</a>
						</li>
						<li class="sidebar-item">
									<a class="sidebar-link" href="charts-chartjs.html">
						  <i class="align-middle" data-feather="bar-chart-2"></i> <span class="align-middle">Charts</span>
						</a>
								</li>
						
								<li class="sidebar-item">
									<a class="sidebar-link" href="maps-google.html">
						  <i class="align-middle" data-feather="map"></i> <span class="align-middle">Maps</span>
						</a>
								</li>
					</ul>
				</div>
			</nav>
		
			<div class="main">
				<nav class="navbar navbar-expand navbar-light navbar-bg">
					<a class="sidebar-toggle js-sidebar-toggle">
						<i class="hamburger align-self-center"></i>
					</a>
		
					<div class="navbar-collapse collapse">
						<ul class="navbar-nav navbar-align">
							<li class="nav-item dropdown">
								<a class="nav-icon dropdown-toggle d-inline-block d-sm-none" href="#" data-bs-toggle="dropdown">
									<i class="align-middle" data-feather="settings"></i>
								</a>
		
								<a class="nav-link dropdown-toggle d-none d-sm-inline-block" href="#" data-bs-toggle="dropdown">
									<i class="align-middle me-2" data-feather="feather"></i>
									<span th:if="${usertype} eq '0'">老师</span>
									<span th:if="${usertype} eq '1'">学生</span>
									<span th:if="${usertype} eq '2'">管理员</span>
									<img src="img/avatars/avatar.jpg" class="avatar img-fluid rounded me-1" alt="Charles Hall" /> 
									<span class="text-dark" th:text="${usermail}"></span>
								</a>
								<div class="dropdown-menu dropdown-menu-end">
									<a class="dropdown-item" href="pages-profile.html"><i class="align-middle me-1" data-feather="user"></i> Profile</a>
									<div class="dropdown-divider"></div>
									<a class="dropdown-item" href="#">Log out</a>
								</div>
							</li>
						</ul>
					</div>
				</nav>
				
				<!--在这里写我自己的东西-->
				<main class="content">
					<section class="mainbox">
							<div class="column">
								<h3>考试基本信息</h3>
								<div class="card">
									<div class="card-body">
										<div class="divide">
											<div class="subdivide">
												<label for="inputsubject" class="form-label">考试科目</label>
												<input class="form-control" type="text" name="subject" placeholder="科目-必填项" id="inputsubject">
											</div>
										</div>
										<div class="divide">
											<div class="subdivide">
												<label for="examstart" class="form-label">考试开始时间</label>
												<input class="form-control" type="datetime-local" name="starttime"  id="examstart">
											</div>
											<div class="subdivide">
												<label for="examend" class="form-label">考试结束时间</label>
												<input class="form-control" type="datetime-local" name="endtime"  id="examend">
											</div>
										</div>
										<div class="divide">
											<div class="subdivide">
												<label for="class1" class="form-label">考试班级</label>
												<div th:if="${#lists.isEmpty(teacherclasses)}">
													<div class="classtable">
														<div class="fornothave"></div>
														<div class="fornothave">
															<div class="subsub"></div>
															<div class="subsub">
																没有班级？
																<form action="/AddingExamquestion1" enctype='multipart/form-data' method='POST'>
																	<button type="submit" style="width: 80px; height: 40px; border-radius: 20%;border: none;background-color: #17A2B8;">
																		<h4 style="margin-top:8px;">
																			<font color="white">创建班级</font>
																		</h4>
																	</button>
																</form>
															</div>
															<div class="subsub"></div>
														</div>
														<div class="fornothave"></div>
													</div>
												</div>
												<div th:if="${not #lists.isEmpty(teacherclasses)}">
													<div class="classtable">
														<div class="eachclass">
															<div class="subclassid">
																
															</div>
															<div class=subclassname>
																<span> 班级名称 </span>
															</div>
															<div class=subclasstype>
																<span style='padding-left: 30px;padding-right: 30px'> 班级科目 </span>
															</div>
															<div class=subclassinfo>
																<span style='padding-left: 60px;padding-right: 60px'> 班级简介 </span>
															</div>
															<div class=submoreinfo>
																<span> 更多信息 </span>
															</div>
														</div>
														<div th:each="i:${teacherclasses}">
															<div class="eachclass">
																<div class="subclassid">
																	<input type="checkbox" name="classid" th:value="${i.classid}" class="form-check-input" id="classidlist">
																</div>
																<div class=subclassname>
																	<span th:text="${i.classname}"></span>
																</div>
																<div class=subclasstype>
																	<span th:text="${i.classtype}"></span>
																</div>
																<div class=subclassinfo>
																	<span th:text="${i.information}"></span>
																</div>
																<div class=submoreinfo>
																	<form action="/class" enctype='multipart/form-data' method='POST'>
																		<input type="hidden" name="classid" th:value="${i.classid}">
																		<button type="submit" style="height:18px;width:40px;
																		margin-left:10px;border-radius: 5px;background-color: #85b7ec;">
																			<p style="font-size: 5px;">详情</p>
																		</button>
																	</form>
																</div>
															</div>
														</div>		
													</div>
												</div>
											</div>
										</div>
										<div class="divide1">
											<div class="subdivide">
												<div class="forradio">
													<div class="subdivide">
														<input  class="form-check-input" type="radio" name="type" value=0 >
														<span class="form-check-label">贡献为题库</span>
													</div>
													<div class="subdivide">
														<input class="form-check-input" type="radio" name="type" value=1 >
														<span class="form-check-label">不贡献为题库</span>
													</div>
												</div>	
											</div>
											<div class="subdivide">
												<form class="form-horizontal" onsubmit="return toVaild()" action="/AddExaminfo1" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="height:30px;width:100px;margin-top:10px;
													margin-left:230px;border-radius: 10px;background-color: #5e80a6;">
														提交考试
													</button>
												</form>
											</div>
										</div>
									</div>
								</div>
							</div>
							<div class="column">
								
							</div>
					</section>
				</main>
			</form>
				
				<footer class="footer">
					<div class="container-fluid">
						<div class="row text-muted">
							<div class="col-6 text-start">
								<p class="mb-0">
									<a class="text-muted" href="https://adminkit.io/" target="_blank"><strong>AdminKit</strong></a> &copy;
								</p>
							</div>
							<div class="col-6 text-end">
								<ul class="list-inline">
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Support</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Help Center</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Privacy</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Terms</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</footer>
			</div>
		</div>
		
		<script src="js/app.js"></script>
	</body>
</html>
